package com.pfzy.lib.sdk.utils;

public class NumberUtil {
    public static long toLong(String num) {
        try {
            return Long.parseLong(num);
        } catch (Exception e) {
            return 0L;
        }
    }

    public static int toInt(String num) {
        try {
            return Integer.parseInt(num);
        } catch (Exception e) {
            return 0;
        }
    }

    public static String toRMB(double number) {
        return String.format("￥%.2f", Double.valueOf(number / 100.0d));
    }
}
